package org.jeecg.modules.business.doc.business.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.business.doc.business.entity.WmsInReceiptMaterial;
import org.jeecg.modules.business.doc.business.entity.dto.ValidMaterialAndWarehouseTypeDTO;
import org.jeecg.modules.business.doc.outbound.entity.vo.UnCreateInVO;
import org.jeecg.modules.business.doc.outbound.entity.vo.UnCreateOutVO;

/**
 * @Description: 入库单-物料
 * @Author: jeecg-boot
 * @Date: 2023-07-31
 * @Version: V1.0
 */
public interface WmsInReceiptMaterialMapper extends BaseMapper<WmsInReceiptMaterial> {

    /**
     * 通过主表id删除子表数据
     *
     * @param mainId 主表id
     * @return boolean
     */
    public boolean deleteByMainId(@Param("mainId") String mainId);

    /**
     * 通过主表id查询子表数据
     *
     * @param mainId 主表id
     * @return List<WmsInReceiptMaterial>
     */
    public List<WmsInReceiptMaterial> selectByMainId(@Param("mainId") String mainId);

    /**
     * 校验入库单-物料类型与仓库存放物料类型dto
     *
     * @param id
     * @return
     */
    List<ValidMaterialAndWarehouseTypeDTO> listByType(@Param("id") String id);

    /**
     * 选单-查询所有未创建入库单的物料信息
     * @param taskId
     * @param o
     * @param materialName
     * @return
     */
    List<UnCreateInVO> listAllUnCreateTaskMaterial(@Param("taskId") String taskId,@Param("receiptId") String receiptId,@Param("materialName") String materialName);
}
